package com.shadowtorcher.dragonstreasure.url;

public class DownloadURL extends URL {
    private final static Integer UUID = 4;
    private final static Integer USERNAME = 5;
    private final static Integer TIME = 6;
    private final static Integer CHECK_CODE = 7;
    private final static Integer FILE_NAME = 8;

    public DownloadURL() {
    }

    public DownloadURL(StringBuffer requestURL) {
        super(requestURL);
        String[] str = requestURL.toString().split("/");
        map.put(UUID, str[UUID]);
        map.put(USERNAME, str[USERNAME]);
        map.put(TIME, str[TIME]);
        map.put(CHECK_CODE, str[CHECK_CODE]);
        map.put(FILE_NAME, str[FILE_NAME]);
    }

    public String getUUID() {
        return map.get(UUID);
    }

    public void setUUID(String uuid) {
        map.put(UUID, uuid);
    }

    public String getUsername() {
        return map.get(USERNAME);
    }

    public void setUsername(String username) {
        map.put(USERNAME, username);
    }

    public String getTime() {
        return map.get(TIME);
    }

    public void setTime(String time) {
        map.put(TIME, time);
    }

    public String getCheckCode() {
        return map.get(CHECK_CODE);
    }

    public void setCheckCode(String checkCode) {
        map.put(CHECK_CODE, checkCode);
    }

    public String getFileName() {
        return map.get(FILE_NAME);
    }

    public void setFileName(String fileName) {
        map.put(FILE_NAME, fileName);
    }
}
